const router = require('koa-router')()

const { loginApi } = require('../../../controller/login/login')

const { checkData } = require('../../../middleware/checkrouterdata')

router.post('/student/login',
    checkData(['username', 'password'], 'Non empty', 'request'),
    loginApi)
router.post('/student/register',
    checkData(['username', 'password', 'nickname'], 'Non empty', 'request'),
    loginApi)


module.exports = router